cmake_minimum_required(VERSION 2.8.3)
project(viconros)

## Compile as C++11, supported in ROS Kinetic and newer
# add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED
        message_generation
        roscpp
        roslib
        geometry_msgs
        nav_msgs
        std_msgs
        tf
        libobjecttracker
        libmotioncapture
        tf_conversions
        )
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
find_package(PCL REQUIRED)


catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES viconros_basecf
#  CATKIN_DEPENDS other_catkin_pkg
#  DEPENDS system_lib
        CATKIN_DEPENDS
        message_runtime
        std_msgs
        tf
        roslib
)


include_directories(
# include
# ${catkin_INCLUDE_DIRS}
        ${catkin_INCLUDE_DIRS}
        ${PCL_INCLUDE_DIRS}
        ../externalDependencies/libobjecttracker/include
)
link_directories(
        ${LIBMOTIONCAPTURE_LINK_DIR}
)
if (ENABLE_VICON)
    add_definitions(-DENABLE_VICON)
endif()

add_executable(viconros
        src/viconros.cpp
        )
target_link_libraries(viconros
        ${catkin_LIBRARIES}
        )

add_executable(trans_node
        src/trans_cam_vicon.cpp)
target_link_libraries(trans_node ${catkin_LIBRARIES})

add_executable(trans_obs_from_vicon2t265
        src/trans_obs_from_vicon2t265.cpp)
target_link_libraries(trans_obs_from_vicon2t265 ${catkin_LIBRARIES})

add_executable(fake_vicon
        src/fake_vicon.cpp)
target_link_libraries(fake_vicon ${catkin_LIBRARIES})

add_executable(calibrate
        src/calibrate.cpp)
target_link_libraries(calibrate ${catkin_LIBRARIES})